Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dev filters to decide where to move the country fields (or not move) #53

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

mircobabini
Copy link
Member

The state dropdown add-on is moving the country (billing and shipping) field just before the bfirstname/sfirstname.

Not always the desired behaviour. Sometimes you just don't want to move the field, or move it somewhere else.
That's where these 2 new filters comes in handy.

Filters:

pmpro_state_dropdowns_bcountry_before_field
pmpro_state_dropdowns_scountry_before_field

Usage:

Don't move the bcountry field

add_filter( 'pmpro_state_dropdowns_bcountry_before_field', '__return_false' );

Move the bcountry field just before the bstate field.

add_filter( 'pmpro_state_dropdowns_bcountry_before_field', function( $fieldname ){
	return 'bstate';
} );

@andrewlimaza andrewlimaza changed the base branch from master to dev August 18, 2023 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant